<?php 

require("dbFunctions.php");

$name = $_POST['name'];
$user = $_POST['user'];
$pass = $_POST['pass'];
$mail = $_POST['mail'];

$pass = md5($pass);

$name = mysql_real_escape_string($name);
$user = mysql_real_escape_string($user);
$mail = mysql_real_escape_string($mail);
$name = stripslashes($name);
$user = stripslashes($user);
$mail = stripslashes($mail);

if(register($name, $user, $pass, $mail, $db) == TRUE){
	header("location:../home.php?p=home");
	}else echo "Nao Registrou";

?>